#include <iostream>
#include <fstream>
#include <windows.h>
using namespace std;
int main(int argc,char *argv[]) {
	string path1 = argv[0];
	for(int i=path1.length()-1,j=0;j<=7;i--,j++) path1.erase(i,1);
	string path = "python.exe " + path1 + "verchecker.py";
	system(path.c_str());
	ifstream fin1("verson.ver");
	ifstream fin2("vernew.ver");
	string v1,v2;
	fin1>>v1; fin2>>v2;
	if(v1 != v2) {
		if(MessageBox(NULL,"有新的版本可更新，是否继续？","Game",MB_YESNO) == IDNO) return 0; 
		path = "python.exe " + path1 + "juqingdowner.py";
		system(path.c_str());
		ofstream fout1("verson.ver");
		fout1<<v2;
		MessageBox(NULL,"更新完毕，即将重启游戏。","Game",MB_OK);
		system("start Game.exe");
		return 0;
	}
	cout<<"单击进入游戏";
	while(1) {
		;
	}
}